<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('realname', 10)->nullable();
            $table->string('company', 100)->nullable();
            $table->decimal('amount', 10, 2);
            $table->string('email')->unique();
            $table->bigInteger('mobile')->unsigned()->nullable();
            $table->string('password');
            $table->rememberToken();
            $table->integer('logined_count')->unsigned();
            $table->boolean('is_active');
            $table->char('last_logined_ip', 15);
            $table->timestamp('last_logined_at');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('users');
    }
}
